from django.shortcuts import render,HttpResponse,redirect,reverse
import os
# Create your views here.
def index_handler(request):
    #return HttpResponse('myapp index')
    file_s = os.listdir(os.path.join('static','file'))
    return render(request,'index.html',context={'file_s':file_s})



def re_handler(request,num):
    return HttpResponse(num)


def user_handler(request,username):
    return HttpResponse('你好：%s' % username)
def redirect_handler():
    return(redirect(reverse("myapp:index")))